﻿define(['durandal/app', 'services/logger', 'plugins/dialog'], function (app, logger, dialog) {
    var title = 'Update or Create';
    var vm = {
        activate: activate,
        show: show,
        canDeactivate: canDeactivate,
        title: title,
        ok: ok,
        cancel: cancel,
        album: ko.observable(null),
    };

    return vm;

    //#region Internal Methods 
    function activate(album) {
        return true;
    }
    function ok() {
        return dialog.close(this, this.album);
    }
    function cancel() {
        return dialog.close(this, null);
    }
    function show(album) {
        vm.album(album);
        return dialog.show(vm);
    }
    function canDeactivate() {
        return true;
    }
});




    



